<%@ include file="/framework/head.jsp"%>
<%@ page contentType="text/html;charset=UTF-8"%>  
<%@ include file="../../common.jsp"%>
<%
	GSCompanyMessageDao dao = new GSCompanyMessageDao();
	WarehouseSearchEvent event = (WarehouseSearchEvent)context.getSessionValue("WarehouseSearchEvent");
	ObjectList list = Warehouse.fetch().mySearch2(con,event,"where status='1' and is_show=1 and lengthb(code)=6");
	//List list = dao.queryCompanyMessageList();
	String messages = (String)context.m_req.getAttribute("message");
	if(messages != null){
		out.print("<script language='javascript'>alert('"+ messages +"');</script>");
	}
%>
<!--********************* Part3:JavaScript Code ***************-->
<!--start 客户端脚本区域-->
<script language=javascript>

var list_code = "listCompanyMessage";

function doSearch()
{
	doCommonSearch();
}

function bizViewWarehouse(id)
{
	viewWin("<%=Config.getSrv()%>?action_code=viewWarehouse&Id="+id);
}




function doToUpdate(id)
{
	SetValue("Id",id);
	SetAction("toUpdateCompanyMessage");
	frm.submit();
}


key_InitDefault();
key_RegSubmitHandler(doSearch);
</script>


<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->
<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code" value="">
<input type=hidden name="Id" value="">
<input type=hidden name=sortOrder value="1">



<%@ include file="/framework/list_head.jsp"%>

<br>

<!--列表标题-->
<%=UIManager.addListHeadTitle("公司列表")%>

<!--********************* Part6:List Area ***************-->

<%=uiListStart%>>

<%@ include file="/framework/list_foot.jsp"%>

<%
	int index = 1 ;
%>	
	<%=uiListHeadTR%>>
		<%=UIManager.addListHeadCheckBox() %>


		<%=UIManager.addListHead("编码",index++)%>

		<%=UIManager.addListHead("名称",index++)%>

		<%=UIManager.addListHead("地址",index++)%>

		<%=UIManager.addListHead("操作",-1)%>  
	<%=uiListHeadTREnd%>>
	
	<!--data-->
<%
	for(int i=0;i<list.size();i++)
	{
		Warehouse obj = (Warehouse)list.get(i);
		
%>
	<%=uiListDataTR[i%2]%> align=center>
    	<%=uiListDataTD%>>
    		<input type="checkbox" name="ids" title="<%=obj.viewCode(con)%>" value="<%=obj.getId()%>">
    	</td>
    	<%=uiListDataTD%>><%=obj.viewCode(con)%></td>
    	<%=uiListDataTD%>><%=obj.viewName(con)%></td>
    	<%=uiListDataTD%>><%=obj.viewAddress(con)%></td>

    	<%=uiListDataTD%>>
    		<a href="" onclick="doToUpdate('<%=obj.getCode()%>');return false;">修改</a>
    	</td>
  	</tr>
<%	
	}
	
%>  

<%@ include file="/framework/list_foot2.jsp"%>

<%=uiListEnd%>


</form>

<form name="formCode1">
	<input type="hidden" name="warehouseCode" id="warehouseCode">
</form>

<%@ include file="/framework/foot.jsp"%>

<!--
	Author    :justin
	FileName  :/system/base/WarehouseList.jsp
-->
